home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-06-29 | 1.3 KB | 38 lines | [TEXT/GEOL] |
- Item 0191703 25-June-90 14:29PDT
-
- From: MM.XOBJ MacroMind, Haim Zamir,PRT
-
- To: CPLUS.DEV$ C++ Interest List--Developers
-
- Sub: walking the inheritance chain
-
- Dear C++ Enthusiasts:
-
- First of all, thanks to Messrs. Schmucker and Rosenstein for their responses to
- my last question on C++ global usage and vtables.
-
- I now pose the following question:
-
- My understanding of vtables so far is that the compiler turns all references to
- virtual methods into vtable indices, and that there is no inheritance chain to
- follow in vtables, since inherited method pointers are copied from base class
- vtables into derived class vtables wherever they are not overridden (preferring
- speed over compactness).
-
- Is there an inheritance chain I can follow during runtime with a piece of code?
- I would like to attach the equivalent of dynamically assigned methods to
- classes, and have no problem doing this, except that I can't inherit them
- without a chain to follow. It seems that instances store only a reference to
- the vtable, which is a dead end.
-
- I am aware of the fact that this goes into implementation dependent country,
- but then again, we can't do everything we need gracefully with plain old
- statically declared methods attached to classes.
-
-
- Haim Zamir
- MacroMind, Inc.
- AppleLink MM.XOBJ
-
-
-